package com.liuzihao.myself;

import com.netflix.client.config.IClientConfig;
import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.annotation.Resource;

/**
 * @Author: Liuzihao
 * @Description:
 * @Date Created in 2021-12-28 09:48
 * @Modified By:
 */
@Configuration
public class MyRule {
    @Resource
    private IClientConfig config;
    @Bean
    public IRule ribbonRule(IClientConfig config){
        return new RandomRule();
    }
}
